//
//  PreparationsModel.m
//  wedding
//
//  Created by 常宽 on 15/1/14.
//  Copyright (c) 2015年 常宽. All rights reserved.
//

#import "PreparationsModel.h"

@implementation PreparationsModel

// 协议方法
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    // 编码的方法 将对象的所有数据写到一起 方便存储
    // 将某一条数据编码
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.typeId forKey:@"typeId"];
    [aCoder encodeObject:self.imageName forKey:@"imageName"];
    
}
- (id)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super init]) {
        // 解码的方法~
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.typeId = [aDecoder decodeObjectForKey:@"typeId"];
        self.imageName = [aDecoder decodeObjectForKey:@"imageName"];
    }
    return self;
}


@end
